<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
	<div class="container containerUser fix pt15">
		<div class="userMain mgb10">
            <ul class="queue">
            	<li class="now">
                    <span>修改密码</span>
                    <i></i>
                </li>
                <li>
                    <span>完成</span>
                    <i></i>
                </li>
            </ul>
            <form action="?m={$m}&c={$c}&a=resetpassword" method="post" id="safeform">
            	<input type="hidden" name="operation" value="resetpassword"/>
                <ul class="submitContent mglr30 mgt15">
                	<li>
                        <span>当前密码：</span>
                        <input tag="当前密码" regmsg="当前密码" autocomplete="off" placeholder="请输入当前密码" class="userInput" type="password" name="oldpassword" id="oldpassword"/>
                    </li>
                    <li>
                        <span>修改密码：</span>
                        <input tag="修改密码" regmsg="修改密码" autocomplete="off" placeholder="请输入修改密码" class="userInput" type="password" name="newpassword" id="newpassword"/>
                    </li>
                    <li>
                        <span>重复密码：</span>
                        <input tag="重复密码" regmsg="重复密码" autocomplete="off" placeholder="请输入重复密码" class="userInput" type="password" name="newpassword2" id="newpassword2"/>
                    </li>
                    <li>
                        <span></span>
                        <a class="submitBtn" id="submitBtn"> 确定</a>
                    </li>
                </ul>
            </form>
        </div>
	</div>
	<script>
    	$('#submitBtn').on('click', '', function (){
    		// 检查表单填写内容是否有误
    		var fm = $('#safeform');
    		fm.submit();
    	})
    	$('#safeform').on('submit', '', function (){
    		if(!this.oldpassword.value){
        		layer.alert('请输入当前密码');
        		return false;
    		}
    		if(!this.newpassword.value){
        		layer.alert('请输入修改密码');
        		return false;
    		}
    		if(this.newpassword.value != this.newpassword2.value){
    			layer.alert('两次输入的密码不一致');
    			return false;
    		}
    		return true;
    	})
    </script>
{template member/footer}
